import {http} from "@/utils/http";

export const pageAlarm = (data,paged,pageSize) => {
  return http({
    url: `/page/alarm.json?pageSize=${pageSize}&paged=${paged}`,
    method: 'POST',
    data:data
  })
}

export const getAlarm = (id) => {
  return http({
    url: `/alarm.json?id=${id}`,
    method: 'GET'
  })
}

export const updateAlarm = (data) => {
  return http({
    url: `/alarm.json`,
    method: 'PUT',
    data
  })
}

export const removeAlarm = (id) => {
  return http({
    url: `/alarm.json?id=${id}`,
    method: 'DELETE'
  })
}


export const statisticAlarm = (data) => {
  return http({
    url: `/alarm/all/count.json`,
    method: 'POST',
    data:data
  })
}
export const alarmTodayCount = (data) => {
  return http({
    url: `/alarm/today/count.json`,
    method: 'POST',
    data:data
  })
}
